#include <cstdio>
int main()
{
    int num;
    char c;
    int left,print=0;
    scanf("%d %c",&num,&c);
    int origin=0;
    int level=0;
    for(level=0;print<=num;++level)
    {
        if(0==level)
        {
            print=1;
        }else{
            origin=print;
            print+=2*(level*2+1);
        }
    }
    print=origin;
    level-=2;
    left=num-print;
    int i,j;
    for(i=0;i<=level;++i)
    {
        for(j=0;j<i;++j)
            putchar(' ');
        for(j=0;j<(level-i)*2+1;++j)
            printf("%c",c);
        putchar('\n');
    }
    for(i=1;i<=level;++i)
    {
        for(j=0;j<level-i;++j)
            putchar(' ');
        for(j=0;j<(i*2)+1;++j)
            printf("%c",c);
        putchar('\n');
    }
    printf("%d\n",left);
    return 0;
}

